﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace msBsc.WebUi.mMall.Seller
{
    public partial class mfRefuseRefund :msBsc.Cls.mBPDealer
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        private void refuseRefund() 
        {
            string refundExpanation=this.GetParamHtValue("refundExpanation");
            string orderId = this.GetParamHtValue("orderId");
            using (msBsc.AppLogic.DataAlc.CBizCustomerRefund customerRefund=new AppLogic.DataAlc.CBizCustomerRefund())
            {
                string ret = customerRefund.DenyRefund(orderId, refundExpanation);
                if (ret != "OK")
                {
                    this.Alert(ret);
                    return;
                }
                else {
                    this.ExecJScript(@"alert(""拒绝成功"");window.location.href = ""/ms_OrderInfo.htm?orderId=" + orderId + @"""");
                }
            }
        }

        public override void DoAction()
        {
            if (this.strAction=="refuseRefund")
            {
                refuseRefund();
            }
        }
    }
}